Skip to content

Numpy 2 upgrade#110

Merged
earth-chris merged 6 commits intomainfrom
numpy-upgrade
Feb 11, 2026
Merged

Numpy 2 upgrade#110
earth-chris merged 6 commits intomainfrom
numpy-upgrade

Conversation

@earth-chris
Copy link
Owner

Closes #109

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates elapid to target NumPy 2.x and adjusts code/tests and packaging workflow to match, addressing the project’s dependency upgrade request.

Changes:

  • Bump project version and update dependency constraints to require NumPy >= 2.0 (and add SciPy minimum).
  • Update AxisError usage/imports for NumPy 2 in library code and tests.
  • Adjust PyPI publish workflow (Python version + permissions/auth inputs).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
pyproject.toml Updates package version and dependency constraints for NumPy 2 (and SciPy).
elapid/models.py Switches AxisError to NumPy 2 import path and updates raising behavior/doc text.
tests/test_models.py Aligns tests with NumPy 2 AxisError import/expectations and minor formatting.
.github/workflows/publish-pypi.yml Updates publish job Python version and job permissions/auth configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pyproject.toml Outdated
Comment on lines 14 to 16
python = ">=3.9"
numpy = ">=1.18,<2.0"
numpy = ">=2.0"
pandas = ">=1.0.3"
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python = ">=3.9" is now potentially inconsistent with numpy = ">=2.0" and the release workflow building with Python 3.11. To avoid users attempting installs on unsupported Python versions (and dependency resolution failures), align the declared Python constraint with the actual supported/tested versions (and update CI matrices accordingly if needed).

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +11
permissions:
id-token: write
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow grants id-token: write but still authenticates via PYPI_API_TOKEN. If you’re not using PyPI Trusted Publishing, drop the id-token permission to follow least privilege; if you are, switch the publish step to OIDC/trusted publishing and remove the API token secret usage.

Suggested change
permissions:
id-token: write

Copilot uses AI. Check for mistakes.
@earth-chris earth-chris merged commit 02e099c into main Feb 11, 2026
6 checks passed
@earth-chris earth-chris deleted the numpy-upgrade branch February 11, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to numpy >2.0

2 participants